#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int a = 0;
	int count = 0;
	scanf("%d", &a);

	while (1 != a)
	{
		if (a % 2 == 0)
		{
			a = a / 2;
		}
		else
		{
			a = a * 3 + 1;
		}
		count++;
	}
	
	printf("%d", count);

	return 0;
}